package it.stessaro.lostcities.collection;

import java.util.Comparator;

public class CardSortByColor implements Comparator<Card>{

    public int compare(Card card1, Card card2) {
    	int col1 = card1.getCardColor();
    	int col2 = card2.getCardColor();
        if (col1 > col2) {
			return 1;
		}else if(col1 < col2){
			return -1;
		}else {
			if (card1.getCardValue() > card2.getCardValue()) {
				return 1;
			}
			return 0;
		}
    }
}
